3.3.7 \(\int \frac {(g \tan (e+f x))^p}{(a+b \sin (e+f x))^2} \, dx\) [207]

3.3.7.1 Optimal result
3.3.7.2 Mathematica [A] (warning: unable to verify)
3.3.7.3 Rubi [F]
3.3.7.4 Maple [F]
3.3.7.5 Fricas [F]
3.3.7.6 Sympy [F]
3.3.7.7 Maxima [F]
3.3.7.8 Giac [F]
3.3.7.9 Mupad [F(-1)]

3.3.7.1 Optimal result

Integrand size = 23, antiderivative size = 737 \[ \int \frac {(g \tan (e+f x))^p}{(a+b \sin (e+f x))^2} \, dx=\frac {a^2 \cos (e+f x) \left (1-\cos ^2(e+f x)\right )^{\frac {1}{2} (-1+q)} \left (1-\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}\right )^{-2+\frac {3-q}{2}+\frac {1}{2} (-1+q)} \left (\left (2 \left (a^2-b^2\right )+b^2 (1+q) \cos ^2(e+f x)\right ) \Phi \left (-\frac {a^2 \cot ^2(e+f x)}{a^2-b^2},1,\frac {1-q}{2}\right )-b^2 (-1+q) \cos ^2(e+f x) \Phi \left (-\frac {a^2 \cot ^2(e+f x)}{a^2-b^2},1,\frac {3-q}{2}\right )\right ) \sin (e+f x) \sin ^2(e+f x)^{\frac {1}{2} (-1-q)} (g \tan (e+f x))^q}{2 \left (a^2-b^2\right )^2 \left (-a^2+b^2\right ) f}-\frac {a^2 \cos (e+f x) \left (1-\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}\right )^{\frac {1}{2} (-1+q)} \operatorname {Hypergeometric2F1}\left (\frac {1-q}{2},\frac {1-q}{2},\frac {3-q}{2},\frac {\cos ^2(e+f x)-\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}}{1-\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}}\right ) \sin (e+f x) \sin ^2(e+f x)^{\frac {1}{2} (-1-q)} (g \tan (e+f x))^q}{\left (a^2-b^2\right )^2 f (-1+q)}+\frac {b^2 \cos (e+f x) \left (1-\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}\right )^{\frac {1}{2} (-1+q)} \operatorname {Hypergeometric2F1}\left (\frac {1-q}{2},\frac {1-q}{2},\frac {3-q}{2},\frac {\cos ^2(e+f x)-\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}}{1-\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}}\right ) \sin (e+f x) \sin ^2(e+f x)^{\frac {1}{2} (-1-q)} (g \tan (e+f x))^q}{\left (a^2-b^2\right )^2 f (-1+q)}-\frac {2 a b \operatorname {AppellF1}\left (\frac {1-q}{2},-\frac {q}{2},2,\frac {3-q}{2},\cos ^2(e+f x),\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}\right ) \cos (e+f x) \sin ^2(e+f x)^{-q/2} (g \tan (e+f x))^q}{\left (a^2-b^2\right )^2 f (-1+q)} \]

output
1/2*a^2*cos(f*x+e)*(1-cos(f*x+e)^2)^(-1/2+1/2*q)/(1-b^2*cos(f*x+e)^2/(-a^2 
+b^2))*((2*a^2-2*b^2+b^2*(1+q)*cos(f*x+e)^2)*HurwitzLerchPhi(a^2*cos(f*x+e 
)^2/(a^2-b^2)/(-1+cos(f*x+e)^2),1,1/2-1/2*q)-b^2*(-1+q)*cos(f*x+e)^2*Hurwi 
tzLerchPhi(a^2*cos(f*x+e)^2/(a^2-b^2)/(-1+cos(f*x+e)^2),1,3/2-1/2*q))*sin( 
f*x+e)*(sin(f*x+e)^2)^(-1/2-1/2*q)*(g*tan(f*x+e))^q/(a^2-b^2)^2/(-a^2+b^2) 
/f-a^2*cos(f*x+e)*(1-b^2*cos(f*x+e)^2/(-a^2+b^2))^(-1/2+1/2*q)*Hypergeomet 
ric2F1(1/2-1/2*q,1/2-1/2*q,3/2-1/2*q,(cos(f*x+e)^2-b^2*cos(f*x+e)^2/(-a^2+ 
b^2))/(1-b^2*cos(f*x+e)^2/(-a^2+b^2)))*sin(f*x+e)*(sin(f*x+e)^2)^(-1/2-1/2 
*q)*(g*tan(f*x+e))^q/(a^2-b^2)^2/f/(-1+q)+b^2*cos(f*x+e)*(1-b^2*cos(f*x+e) 
^2/(-a^2+b^2))^(-1/2+1/2*q)*Hypergeometric2F1(1/2-1/2*q,1/2-1/2*q,3/2-1/2* 
q,(cos(f*x+e)^2-b^2*cos(f*x+e)^2/(-a^2+b^2))/(1-b^2*cos(f*x+e)^2/(-a^2+b^2 
)))*sin(f*x+e)*(sin(f*x+e)^2)^(-1/2-1/2*q)*(g*tan(f*x+e))^q/(a^2-b^2)^2/f/ 
(-1+q)-2*a*b*AppellF1(1/2-1/2*q,-1/2*q,2,3/2-1/2*q,cos(f*x+e)^2,b^2*cos(f* 
x+e)^2/(-a^2+b^2))*cos(f*x+e)*(g*tan(f*x+e))^q/(a^2-b^2)^2/f/(-1+q)/((sin( 
f*x+e)^2)^(1/2*q))
 
3.3.7.2 Mathematica [A] (warning: unable to verify)

Time = 8.18 (sec) , antiderivative size = 695, normalized size of antiderivative = 0.94 \[ \int \frac {(g \tan (e+f x))^p}{(a+b \sin (e+f x))^2} \, dx=\frac {\cos (e+f x) \sin (e+f x) (g \tan (e+f x))^p \left (a (2+p) \left (\left (a^2+b^2\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1+p}{2},\frac {3+p}{2},\left (-1+\frac {b^2}{a^2}\right ) \tan ^2(e+f x)\right )-2 b^2 \operatorname {Hypergeometric2F1}\left (2,\frac {1+p}{2},\frac {3+p}{2},\left (-1+\frac {b^2}{a^2}\right ) \tan ^2(e+f x)\right )\right )+2 b \left (-a^2+b^2\right ) (1+p) \operatorname {AppellF1}\left (\frac {2+p}{2},-\frac {1}{2},2,\frac {4+p}{2},-\tan ^2(e+f x),\left (-1+\frac {b^2}{a^2}\right ) \tan ^2(e+f x)\right ) \tan (e+f x)\right )}{f (1+p) (a+b \sin (e+f x))^2 \left (a (2+p) \left (\left (a^2+b^2\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1+p}{2},\frac {3+p}{2},\left (-1+\frac {b^2}{a^2}\right ) \tan ^2(e+f x)\right )-2 b^2 \operatorname {Hypergeometric2F1}\left (2,\frac {1+p}{2},\frac {3+p}{2},\left (-1+\frac {b^2}{a^2}\right ) \tan ^2(e+f x)\right )\right )+2 b \left (-a^2+b^2\right ) \operatorname {AppellF1}\left (\frac {2+p}{2},-\frac {1}{2},2,\frac {4+p}{2},-\tan ^2(e+f x),\left (-1+\frac {b^2}{a^2}\right ) \tan ^2(e+f x)\right ) \tan (e+f x)+2 b \left (-a^2+b^2\right ) (1+p) \operatorname {AppellF1}\left (\frac {2+p}{2},-\frac {1}{2},2,\frac {4+p}{2},-\tan ^2(e+f x),\left (-1+\frac {b^2}{a^2}\right ) \tan ^2(e+f x)\right ) \tan (e+f x)+\frac {2 b \left (-a^2+b^2\right ) (2+p) \left (\left (-4+\frac {4 b^2}{a^2}\right ) \operatorname {AppellF1}\left (\frac {4+p}{2},-\frac {1}{2},3,\frac {6+p}{2},-\tan ^2(e+f x),\left (-1+\frac {b^2}{a^2}\right ) \tan ^2(e+f x)\right )+\operatorname {AppellF1}\left (\frac {4+p}{2},\frac {1}{2},2,\frac {6+p}{2},-\tan ^2(e+f x),\left (-1+\frac {b^2}{a^2}\right ) \tan ^2(e+f x)\right )\right ) \tan ^3(e+f x)}{4+p}+a (2+p) \left (-2 b^2 \left (-\operatorname {Hypergeometric2F1}\left (2,\frac {1+p}{2},\frac {3+p}{2},\left (-1+\frac {b^2}{a^2}\right ) \tan ^2(e+f x)\right )+\frac {1}{\left (1+\left (1-\frac {b^2}{a^2}\right ) \tan ^2(e+f x)\right )^2}\right )+\left (a^2+b^2\right ) \left (-\operatorname {Hypergeometric2F1}\left (1,\frac {1+p}{2},\frac {3+p}{2},\left (-1+\frac {b^2}{a^2}\right ) \tan ^2(e+f x)\right )+\frac {1}{1+\left (1-\frac {b^2}{a^2}\right ) \tan ^2(e+f x)}\right )\right )\right )} \]

input
Integrate[(g*Tan[e + f*x])^p/(a + b*Sin[e + f*x])^2,x]
 
output
(Cos[e + f*x]*Sin[e + f*x]*(g*Tan[e + f*x])^p*(a*(2 + p)*((a^2 + b^2)*Hype 
rgeometric2F1[1, (1 + p)/2, (3 + p)/2, (-1 + b^2/a^2)*Tan[e + f*x]^2] - 2* 
b^2*Hypergeometric2F1[2, (1 + p)/2, (3 + p)/2, (-1 + b^2/a^2)*Tan[e + f*x] 
^2]) + 2*b*(-a^2 + b^2)*(1 + p)*AppellF1[(2 + p)/2, -1/2, 2, (4 + p)/2, -T 
an[e + f*x]^2, (-1 + b^2/a^2)*Tan[e + f*x]^2]*Tan[e + f*x]))/(f*(1 + p)*(a 
 + b*Sin[e + f*x])^2*(a*(2 + p)*((a^2 + b^2)*Hypergeometric2F1[1, (1 + p)/ 
2, (3 + p)/2, (-1 + b^2/a^2)*Tan[e + f*x]^2] - 2*b^2*Hypergeometric2F1[2, 
(1 + p)/2, (3 + p)/2, (-1 + b^2/a^2)*Tan[e + f*x]^2]) + 2*b*(-a^2 + b^2)*A 
ppellF1[(2 + p)/2, -1/2, 2, (4 + p)/2, -Tan[e + f*x]^2, (-1 + b^2/a^2)*Tan 
[e + f*x]^2]*Tan[e + f*x] + 2*b*(-a^2 + b^2)*(1 + p)*AppellF1[(2 + p)/2, - 
1/2, 2, (4 + p)/2, -Tan[e + f*x]^2, (-1 + b^2/a^2)*Tan[e + f*x]^2]*Tan[e + 
 f*x] + (2*b*(-a^2 + b^2)*(2 + p)*((-4 + (4*b^2)/a^2)*AppellF1[(4 + p)/2, 
-1/2, 3, (6 + p)/2, -Tan[e + f*x]^2, (-1 + b^2/a^2)*Tan[e + f*x]^2] + Appe 
llF1[(4 + p)/2, 1/2, 2, (6 + p)/2, -Tan[e + f*x]^2, (-1 + b^2/a^2)*Tan[e + 
 f*x]^2])*Tan[e + f*x]^3)/(4 + p) + a*(2 + p)*(-2*b^2*(-Hypergeometric2F1[ 
2, (1 + p)/2, (3 + p)/2, (-1 + b^2/a^2)*Tan[e + f*x]^2] + (1 + (1 - b^2/a^ 
2)*Tan[e + f*x]^2)^(-2)) + (a^2 + b^2)*(-Hypergeometric2F1[1, (1 + p)/2, ( 
3 + p)/2, (-1 + b^2/a^2)*Tan[e + f*x]^2] + (1 + (1 - b^2/a^2)*Tan[e + f*x] 
^2)^(-1)))))
 
3.3.7.3 Rubi [F]

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(g \tan (e+f x))^p}{(a+b \sin (e+f x))^2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(g \tan (e+f x))^p}{(a+b \sin (e+f x))^2}dx\)

\(\Big \downarrow \) 3211

\(\displaystyle \int \frac {(g \tan (e+f x))^p}{(a+b \sin (e+f x))^2}dx\)

input
Int[(g*Tan[e + f*x])^p/(a + b*Sin[e + f*x])^2,x]
 
output
$Aborted
 

3.3.7.3.1 Defintions of rubi rules used

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3211
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((g_.)*tan[(e_.) + (f_.)*( 
x_)])^(p_.), x_Symbol] :> Unintegrable[(a + b*Sin[e + f*x])^m*(g*Tan[e + f* 
x])^p, x] /; FreeQ[{a, b, e, f, g, m, p}, x]
 
3.3.7.4 Maple [F]

\[\int \frac {\left (g \tan \left (f x +e \right )\right )^{p}}{\left (a +b \sin \left (f x +e \right )\right )^{2}}d x\]

input
int((g*tan(f*x+e))^p/(a+b*sin(f*x+e))^2,x)
 
output
int((g*tan(f*x+e))^p/(a+b*sin(f*x+e))^2,x)
 
3.3.7.5 Fricas [F]

\[ \int \frac {(g \tan (e+f x))^p}{(a+b \sin (e+f x))^2} \, dx=\int { \frac {\left (g \tan \left (f x + e\right )\right )^{p}}{{\left (b \sin \left (f x + e\right ) + a\right )}^{2}} \,d x } \]

input
integrate((g*tan(f*x+e))^p/(a+b*sin(f*x+e))^2,x, algorithm="fricas")
 
output
integral(-(g*tan(f*x + e))^p/(b^2*cos(f*x + e)^2 - 2*a*b*sin(f*x + e) - a^ 
2 - b^2), x)
 
3.3.7.6 Sympy [F]

\[ \int \frac {(g \tan (e+f x))^p}{(a+b \sin (e+f x))^2} \, dx=\int \frac {\left (g \tan {\left (e + f x \right )}\right )^{p}}{\left (a + b \sin {\left (e + f x \right )}\right )^{2}}\, dx \]

input
integrate((g*tan(f*x+e))**p/(a+b*sin(f*x+e))**2,x)
 
output
Integral((g*tan(e + f*x))**p/(a + b*sin(e + f*x))**2, x)
 
3.3.7.7 Maxima [F]

\[ \int \frac {(g \tan (e+f x))^p}{(a+b \sin (e+f x))^2} \, dx=\int { \frac {\left (g \tan \left (f x + e\right )\right )^{p}}{{\left (b \sin \left (f x + e\right ) + a\right )}^{2}} \,d x } \]

input
integrate((g*tan(f*x+e))^p/(a+b*sin(f*x+e))^2,x, algorithm="maxima")
 
output
integrate((g*tan(f*x + e))^p/(b*sin(f*x + e) + a)^2, x)
 
3.3.7.8 Giac [F]

\[ \int \frac {(g \tan (e+f x))^p}{(a+b \sin (e+f x))^2} \, dx=\int { \frac {\left (g \tan \left (f x + e\right )\right )^{p}}{{\left (b \sin \left (f x + e\right ) + a\right )}^{2}} \,d x } \]

input
integrate((g*tan(f*x+e))^p/(a+b*sin(f*x+e))^2,x, algorithm="giac")
 
output
integrate((g*tan(f*x + e))^p/(b*sin(f*x + e) + a)^2, x)
 
3.3.7.9 Mupad [F(-1)]

Timed out. \[ \int \frac {(g \tan (e+f x))^p}{(a+b \sin (e+f x))^2} \, dx=\int \frac {{\left (g\,\mathrm {tan}\left (e+f\,x\right )\right )}^p}{{\left (a+b\,\sin \left (e+f\,x\right )\right )}^2} \,d x \]

input
int((g*tan(e + f*x))^p/(a + b*sin(e + f*x))^2,x)
 
output
int((g*tan(e + f*x))^p/(a + b*sin(e + f*x))^2, x)